package com.sina.weibo;

import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class ReadModeActivity extends BaseActivity
{
  private ReadModeAdapter mAdapter;
  private SharedPreferences.Editor mEditor;
  private LayoutInflater mInflater;
  private ListView mListView;
  private int mReadMode = 0;
  private ReadModeAdapter mReadModeAdapter;
  private SharedPreferences mSp;
  String[] strs;

  protected void handleTitleBarEvent(int paramInt)
  {
    switch (paramInt)
    {
    default:
    case 1:
    }
    while (true)
    {
      return;
      finish();
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setView(2130903063);
    String str1 = getString(2131427528);
    String str2 = getString(2131427724);
    setTitleBar(1, str1, str2, null);
    SharedPreferences localSharedPreferences = getSharedPreferences("readmode", 0);
    this.mSp = localSharedPreferences;
    SharedPreferences.Editor localEditor = getSharedPreferences("readmode", 0).edit();
    this.mEditor = localEditor;
    int i = this.mSp.getInt("readmode", 0);
    this.mReadMode = i;
    String[] arrayOfString = getResources().getStringArray(2131165199);
    this.strs = arrayOfString;
    ReadModeAdapter localReadModeAdapter1 = new ReadModeAdapter();
    this.mAdapter = localReadModeAdapter1;
    ListView localListView1 = (ListView)findViewById(2131624044);
    this.mListView = localListView1;
    ListView localListView2 = this.mListView;
    ReadModeAdapter localReadModeAdapter2 = this.mAdapter;
    localListView2.setAdapter(localReadModeAdapter2);
    ListView localListView3 = this.mListView;
    ReadModeActivity.1 local1 = new ReadModeActivity.1(this);
    localListView3.setOnItemClickListener(local1);
  }

  class ReadModeAdapter extends BaseAdapter
  {
    private int lastItemPosition;
    private LayoutInflater mInflater;

    public ReadModeAdapter()
    {
      int i = ReadModeActivity.this.strs.length - 1;
      this.lastItemPosition = i;
      LayoutInflater localLayoutInflater = LayoutInflater.from(ReadModeActivity.this);
      this.mInflater = localLayoutInflater;
    }

    public int getCount()
    {
      return ReadModeActivity.this.strs.length;
    }

    public Object getItem(int paramInt)
    {
      return Integer.valueOf(paramInt);
    }

    public long getItemId(int paramInt)
    {
      return paramInt;
    }

    public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
    {
      ViewHolder localViewHolder;
      if (paramView == null)
      {
        paramView = this.mInflater.inflate(2130903072, null);
        localViewHolder = new ViewHolder();
        TextView localTextView1 = (TextView)paramView.findViewById(2131624046);
        localViewHolder.tv = localTextView1;
        ImageView localImageView1 = (ImageView)paramView.findViewById(2131624045);
        localViewHolder.iv = localImageView1;
        ImageView localImageView2 = (ImageView)paramView.findViewById(2131624047);
        localViewHolder.iv2 = localImageView2;
        paramView.setTag(localViewHolder);
        TextView localTextView2 = localViewHolder.tv;
        String str = ReadModeActivity.this.strs[paramInt];
        localTextView2.setText(str);
        localViewHolder.tv.setTextSize(20.0F);
        if (ReadModeActivity.this.mReadMode != paramInt)
          break label198;
        ImageView localImageView3 = localViewHolder.iv;
        Drawable localDrawable1 = paramView.getResources().getDrawable(2130837548);
        localImageView3.setImageDrawable(localDrawable1);
      }
      while (true)
      {
        localViewHolder.iv2.setVisibility(8);
        int i = this.lastItemPosition;
        if (paramInt == i)
          paramView.setBackgroundResource(2130837962);
        return paramView;
        localViewHolder = (ViewHolder)paramView.getTag();
        break;
        label198: ImageView localImageView4 = localViewHolder.iv;
        Drawable localDrawable2 = paramView.getResources().getDrawable(2130837547);
        localImageView4.setImageDrawable(localDrawable2);
      }
    }

    class ViewHolder
    {
      ImageView iv;
      ImageView iv2;
      TextView tv;

      ViewHolder()
      {
      }
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.ReadModeActivity
 * JD-Core Version:    0.6.0
 */